﻿using System;
using System.Windows.Data;
using SoftSource.Timecard.Web.Data;

namespace SoftSource.Timecard.Converters
{
    public sealed class BillingStateIDToEditableConverter : IValueConverter
    {
        #region IValueConverter Members

        public object Convert(object value, Type targetType, object parameter, System.Globalization.CultureInfo culture)
        {
            if (value != null && value is int)
            {
                int billingState = (int)value;
                if (billingState == BillingState.Billed)
                    return false;
                return true;
            }
            return false;
        }

        public object ConvertBack(object value, Type targetType, object parameter, System.Globalization.CultureInfo culture)
        {
            throw new NotImplementedException();
        }

        #endregion
    }
}
